#ifndef _TD_BASIC_SHAPE_H_
#define _TD_BASIC_SHAPE_H_

/************************************************************************/
/* PROJECT                                                              */
/************************************************************************/
#include "Coord2D.h"

namespace TD_Core {

	class BaseShape {
	
	protected:
		/** Basic coordinates info.*/
		Coord2D m_position;
		float m_rotationAngle;

	public: 
		
		/************************************************************************/
		/* Constructors                                                         */
		/************************************************************************/
		//Constructor default
		explicit inline BaseShape() {
			//Coords are by default at the origin
			m_rotationAngle = 0;
		};

		//Copy constructor
		explicit inline BaseShape(const BaseShape &rhs) {
			m_position = rhs.getPosition();
			m_rotationAngle = rhs.getRotationAngle();
		}
		
		//Assignment constructor
		inline BaseShape & operator=(const BaseShape &rhs) {
			m_position = rhs.getPosition();
			m_rotationAngle = rhs.getRotationAngle();
			return(*this);
		}
				
		/************************************************************************/
		/* Access functions                                                     */
		/************************************************************************/
		inline const Coord2D & getPosition() const {
			return(m_position);
		}
		inline void setPosition(const Coord2D &position) {
			m_position = position;
		}
		inline float getRotationAngle() const {
			return(m_rotationAngle);
		}
		
		/************************************************************************/
		/* Functionalities                                                      */
		/************************************************************************/
		/** Pure virtual collision checking. */
		virtual bool collisionCheck(BaseShape *other) = 0;
		virtual bool collisionCheck(const Coord2D &position) = 0;
		virtual const Coord2D & getBoundaries() const = 0;
	};
}

#endif

